/*
 ============================================================================
 Name        : XInt32.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CXInt32 declaration
 ============================================================================
 */

#ifndef XINT32_H
#define XINT32_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>

// CLASS DECLARATION
const TInt XInt32m_nMaxBase = 0x0FFFFFFF; // 28bit
const TInt XInt32m_nMinBase = 0xF0000000;
const TUint XInt32m_cMaxMul = 7;

/**
 *  CXInt32
 * 
 */
class XInt32
{
public:
    XInt32();
    XInt32(const XInt32& x);
    XInt32(const TInt64 n);

    TInt GetRawData() const;
    void SetRawData(TInt n);
    
    TInt64 GetValue() const;

    operator TInt64()
    {
        return GetValue();
    }
    XInt32& operator=(const XInt32& x);
    XInt32 operator=(const TInt64 n);
    XInt32 operator+=(const TInt64 n);
    TBool operator==(XInt32 x);
    
    TInt m_nBase :29;
    TUint m_cMul :3;
};

#endif // XINT32_H
